/* eslint-disable consistent-return */
import React, { PureComponent } from 'react';
import {
  DownOutlined,
  ExclamationCircleOutlined,
  PlusOutlined,
  UpOutlined,
} from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import {
  Row,
  Col,
  Input,
  Button,
  Dropdown,
  DatePicker,
  Select,
  Menu,
  Modal,
  message,
  Radio,
} from 'antd';
import { connect } from 'dva';
import queryString from 'query-string';
import router from 'umi/router';
import moment from 'moment';
import StandardTable from '@/components/StandardTable';
import { checkPermissions } from '@/utils/authority';
import Authorized from '@/utils/Authorized';
import downloadfile from '@/utils/utils';
import styles from '@/utils/utils.less';
import DictCode from '../../components/DictCode';
import Customer from '../../components/Customer';
import judegAuthority from '../../SocialManage/judgeAuthority';
import SearchPersonEs from '../../components/SearchPersonEs';
import HOCSelect from '@/components/AntDesign/Select';

const { RangePicker } = DatePicker;
const FormItem = Form.Item;
const { Option } = Select;
@Form.create()
@connect(({ login: { systemList } }) => ({
  sysCode: (systemList.length && systemList[0].sysCode) || 1,
}))
@connect(({ rebate, loading, publicdata: { probTypeList } }) => ({
  probTypeList,
  rebate,
  expandForm: rebate.expandForm,
  formFieldsValue: rebate.formFieldsValue,
  loading: loading.models.rebate,
}))
class RebateTmp extends PureComponent {
  tableSearchLayout = {
    labelCol: { md: { span: 7 } },
    wrapperCol: { md: { span: 17 } },
  };

  constructor(props) {
    super(props);
    this.state = {
      isSign: false,
      receivePaidFlag: false,
      isCsweb: true, // 是否是客服系统
    };
  }

  componentDidMount() {
    const {
      rebate: { activeKey },
      dispatch,
      onRef,
      rebate: { pageData },
      location,
      sysCode,
    } = this.props;
    this.setState({ isCsweb: sysCode === 1 });
    onRef(this);
    dispatch({
      type: 'publicdata/fetchProType',
      payload: {},
    });
    dispatch({
      type: 'rebate/fetchDicList',
      payload: ['PAY_OBJ'],
    });
    const { isMenuLink } = queryString.parse(location.search);
    const tempActiveKey = queryString.parse(location.search).activeKey || activeKey;
    dispatch({
      type: 'rebate/updateModelData',
      payload: {
        activeKey: tempActiveKey,
      },
    });
    if (isMenuLink) {
      this.resetAndGeLlist(location);
    } else {
      this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
    }
  }

  create = () => {
    const { location, activeKey } = this.props;
    const { pathname } = location;
    // const { type } = this.props;
    const tempUrl = pathname.split('/index')[0];
    router.push(`${tempUrl}/add?type=${activeKey}`);
  };

  toggleForm = () => {
    const { expandForm, dispatch } = this.props;
    dispatch({
      type: 'rebate/updateModelData',
      payload: {
        expandForm: !expandForm,
      },
    });
  };

  handleFormReset = () => {
    const { form, dispatch } = this.props;
    dispatch({
      type: 'rebate/updateModelData',
      payload: {
        formFieldsValue: {},
      },
    });
    form.resetFields();
    form.setFieldsValue({
      creTime: null,
    });
  };

  downExcel = () => {
    // const inParam = {};
    const { form, activeKey, location } = this.props;
    const authority = judegAuthority(location);
    let dataType = null;
    if (authority === 'socaccmanagereceive') {
      dataType = 1;
    } else if (authority === 'socaccmanagesend') {
      dataType = 2;
    } else {
      dataType = null;
    }
    form.validateFields(
      ['creTime', 'source', 'state', 'serTypeId', 'custId', 'empName', 'blngCs'],
      (err, fieldsValue) => {
        if (err) return;
        const tempFieldsValue = { ...fieldsValue, dataType };
        if (fieldsValue.creTime) {
          tempFieldsValue.beginTime = moment(fieldsValue.creTime[0]).valueOf();
          tempFieldsValue.endTime = moment(fieldsValue.creTime[1]).valueOf();
          delete tempFieldsValue.creTime;
        }
        downloadfile(
          tempFieldsValue,
          Number(activeKey) === 1
            ? '/esApi/insRefundInfo/downloadExcel'
            : '/esApi/accuRefundInfo/downloadExcel',
          'POST'
        );
      }
    );
  };

  exportPage = () => {
    const { selectedRows, activeKey, selectedRowKeys } = this.props;
    // const { form } = this.props;
    if (selectedRows.length) {
      if (Number(activeKey) === 1) {
        downloadfile(
          { refundInfoIds: selectedRowKeys },
          '/esApi/insRefundInfo/downloadExcel',
          'POST'
        );
      } else {
        downloadfile(
          { refundInfoIds: selectedRowKeys },
          '/esApi/accuRefundInfo/downloadExcel',
          'POST'
        );
      }
    } else {
      Modal.confirm({
        title: `你确定要导出全部数据吗？`,
        icon: <ExclamationCircleOutlined />,
        okText: '确认',
        cancelText: '取消',
        onOk: () => {
          this.downExcel();
        },
      });
    }
  };

  getList = (
    // eslint-disable-next-line react/destructuring-assignment
    activeKey = this.props.activeKey,
    currentPage = 1,
    pageSize = 10,
    queryParam,
    isClear = true
  ) => {
    const { dispatch, form, location, clearSelect } = this.props;
    if (isClear) {
      clearSelect();
    }
    form.validateFields(
      ['creTime', 'source', 'state', 'serTypeId', 'custId', 'empName', 'blngCs'],
      (err, fieldsValue) => {
        if (err) return;
        const tempFieldsValue = queryParam || fieldsValue;
        dispatch({
          type: 'rebate/updateModelData',
          payload: {
            activeKey,
            formFieldsValue: queryParam || fieldsValue,
          },
        });
        const tempValues = {};
        Object.keys(tempFieldsValue).forEach(key => {
          if (key === 'creTime' && tempFieldsValue[key]) {
            tempValues.beginTime = moment(tempFieldsValue.creTime[0]).valueOf();
            tempValues.endTime = moment(tempFieldsValue.creTime[1]).valueOf();
          } else {
            tempValues[key] =
              tempFieldsValue[key] === undefined || tempFieldsValue[key] === null
                ? null
                : tempFieldsValue[key].trim();
          }
        });
        const refundInfoVo = tempValues;
        const pageArg = { currentPage, pageSize };
        const authority = judegAuthority(location);
        let params = {};
        if (Number(activeKey) === 1) {
          params = {
            insRefundInfoVo: refundInfoVo,
            pageArg,
          };
        } else {
          params = {
            accuRefundInfoVo: refundInfoVo,
            pageArg,
          };
        }
        if (authority === 'socaccmanagereceive') {
          if (params.insRefundInfoVo) {
            params.insRefundInfoVo.dataType = 1;
          }
          if (params.accuRefundInfoVo) {
            params.accuRefundInfoVo.dataType = 1;
          }
        }
        if (authority === 'socaccmanagesend') {
          if (params.insRefundInfoVo) {
            params.insRefundInfoVo.dataType = 2;
          }
          if (params.accuRefundInfoVo) {
            params.accuRefundInfoVo.dataType = 2;
          }
        }
        if (Number(activeKey) === 1) {
          dispatch({
            type: 'rebate/fetchInsList',
            payload: params,
          });
        } else {
          dispatch({
            type: 'rebate/fetchAccuList',
            payload: params,
          });
        }
      }
    );
  };

  markCharged = () => {
    const { location } = this.props;
    const authority = judegAuthority(location);
    if (authority === 'socaccmanagereceive') {
      this.receivePaid(); // 接单的标记已支付
      return;
    }
    const { selectedRows, selectedRowKeys } = this.props;
    if (selectedRowKeys.length === 0) {
      message.warning('请选择数据进行操作！');
      return;
    }
    const selectKey = [];
    selectedRows.forEach(item => {
      selectKey.push(item.state);
    });
    if (
      selectKey.indexOf(1) > -1 ||
      selectKey.indexOf(3) > -1 ||
      selectKey.indexOf(4) > -1 ||
      selectKey.indexOf(5) > -1
    ) {
      message.warning(`所选数据非已认领状态，不可标记已支付。`);
      this.setState({
        isSign: false,
      });
    } else {
      this.setState({
        isSign: true,
      });
    }
  };

  submark = () => {
    const { nowPage, pageNum } = this.state;
    const { dispatch, selectedRows, activeKey } = this.props;
    const newSelectedRowKeys = [];
    selectedRows.forEach(item => {
      newSelectedRowKeys.push({
        vno: item.vno,
        refundInfoId: item.refundInfoId,
      });
    });

    dispatch({
      type: 'rebate/markModelData',
      payload: { newSelectedRowKeys, activeKey },
      callback: res => {
        if (res.success) {
          if (+res.data.errorCount === 0 && +res.data.successCount !== 0) {
            message.success('标记成功！');
            this.setState({
              isSign: false,
            });
            this.getList(nowPage, pageNum);
          } else {
            this.setState({
              isSign: false,
            });
          }
        } else {
          this.setState({
            isSign: false,
          });
          message.warning(res.message || '标记失败');
        }
      },
    });
  };

  // 标记成功的关闭
  handleCancel = () => {
    const { nowPage, pageNum } = this.state;
    this.getList(nowPage, pageNum);
  };

  closeUnmark = () => {
    this.setState({
      isSign: false,
    });
  };

  alreadyPaid = () => {
    const {
      selectedRows,
      activeKey,
      dispatch,
      rebate: { pageData },
    } = this.props;
    if (!selectedRows || selectedRows.length === 0) {
      return message.warning('请至少选择一条数据!');
    }
    const newSelectedRowKeys = selectedRows.map(item => ({
      vno: item.vno,
      refundInfoId: item.refundInfoId,
    }));
    Modal.confirm({
      title: `已选择${selectedRows.length}条数据，是否确认全部标记已到款`,
      icon: <ExclamationCircleOutlined />,
      content: `请线下和财务核实每笔款项已到款，标记后不可取消标记`,
      okText: '确认',
      cancelText: '取消',
      onOk: () => {
        dispatch({
          type: 'rebate/alreadyPaid',
          payload: {
            newSelectedRowKeys,
            activeKey,
          },
        }).then(res => {
          if (res.success) {
            if (res.data.successCount === res.data.taskCount) {
              this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
              return message.success('标记成功');
            }
            if (res.data.errorCount === res.data.taskCount) {
              return Modal.error({
                title: '标记失败',
                content: '所选数据非待认领状态，不可标记已到款',
                okText: '关闭',
                okType: 'default',
                autoFocusButton: 'cancel',
                onOk: () => {
                  this.getList(
                    undefined,
                    pageData.pagination.current,
                    pageData.pagination.pageSize
                  );
                },
              });
            }
            return Modal.warning({
              title: '标记成功',
              content: `所选${selectedRows.length}条数据中，${res.data.successCount}条已标记成功，${
                res.data.errorCount
              }条数据状态非待认领，不可标记`,
              okText: '关闭',
              okType: 'default',
              autoFocusButton: 'cancel',
              onOk: () => {
                this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
              },
            });
          }
          message.warning(res.message || '服务端错误');
        });
      },
    });
  };

  batchAdd = () => {
    const { activeKey } = this.props;
    router.push(`/fmmanage/rebate/batchadd?type=${activeKey}`);
  };

  receivePaid = () => {
    const { selectedRows, selectedRowKeys } = this.props;
    if (!selectedRows || selectedRowKeys.length === 0) {
      message.warning('请选择数据进行操作！');
      return;
    }
    const selectKey = [];
    selectedRows.forEach(item => {
      selectKey.push(item.state);
    });
    if (
      selectKey.indexOf(1) > -1 ||
      selectKey.indexOf(3) > -1 ||
      selectKey.indexOf(4) > -1 ||
      selectKey.indexOf(5) > -1
    ) {
      message.warning(`所选数据非已认领状态，不可标记已支付。`);
      this.setState({
        isSign: false,
      });
    } else {
      this.setState({
        receivePaidFlag: true,
      });
    }
  };

  closeReceive = () => {
    this.setState({
      receivePaidFlag: false,
    });
  };

  submitReceive = () => {
    const {
      selectedRows,
      activeKey,
      dispatch,
      rebate: { pageData },
      form,
    } = this.props;

    form.validateFields(['payObj'], (err, values) => {
      if (err) return;
      const newSelectedRowKeys = selectedRows.map(item => ({
        vno: item.vno,
        refundInfoId: item.refundInfoId,
        payObj: values.payObj,
      }));
      dispatch({
        type: 'rebate/submitReceive',
        payload: {
          newSelectedRowKeys,
          activeKey,
        },
      }).then(res => {
        if (res.success) {
          if (res.data.successCount === res.data.taskCount) {
            this.setState({
              receivePaidFlag: false,
            });
            this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
            return message.success('标记成功');
          }
          if (res.data.errorCount === res.data.taskCount) {
            this.setState({
              receivePaidFlag: false,
            });
            return Modal.error({
              title: '标记失败',
              content: '所选数据非已认领状态，不可标记已支付',
              okText: '关闭',
              okType: 'default',
              onOk: () => {
                this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
              },
              autoFocusButton: 'cancel',
            });
          }
          this.setState({
            receivePaidFlag: false,
          });
          Modal.warning({
            title: '标记成功',
            content: `所选${selectedRows.length}条数据中，${res.data.successCount}条已标记成功，${
              res.data.errorCount
            }条数据状态非已认领，不可标记`,
            okText: '关闭',
            okType: 'default',
            onOk: () => {
              this.getList(undefined, pageData.pagination.current, pageData.pagination.pageSize);
            },
            autoFocusButton: 'cancel',
          });
        } else {
          this.setState({
            receivePaidFlag: false,
          });
          message.warning(res.message || '服务端错误');
        }
      });
    });
  };

  async resetAndGeLlist(location) {
    const { dispatch } = this.props;
    const { queryParam } = location;
    dispatch({
      type: 'rebate/updateModelData',
      payload: {
        expandForm: Boolean(queryParam),
      },
    });
    await this.handleFormReset();
    await this.getList(undefined, undefined, undefined, queryParam);
    dispatch({
      type: 'global/changeIsMenuLink',
      payload: location,
    });
  }

  renderForm() {
    const { expandForm } = this.props;
    return expandForm ? this.renderAdvancedForm() : this.renderSimpleForm();
  }

  renderAdvancedForm() {
    const { isCsweb } = this.state;
    const {
      form: { getFieldDecorator },
      serviceDicList,
      formFieldsValue,
      activeKey,
    } = this.props;
    console.log('formFieldsValue.blngCs', formFieldsValue.blngCs);
    return (
      <Form onSubmit={this.handleSearch} layout="inline">
        <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
          <Col md={8} sm={24}>
            <FormItem label="姓名" {...this.tableSearchLayout}>
              {getFieldDecorator('empName', {
                initialValue: formFieldsValue.empName,
              })(<Input placeholder="请输入员工姓名" maxLength={15} />)}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <FormItem label="客户名称" {...this.tableSearchLayout}>
              {getFieldDecorator('custId', {
                initialValue: formFieldsValue.custId,
              })(isCsweb ? <Customer allowClear /> : <Customer attr allowClear />)}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <FormItem label="服务类型" {...this.tableSearchLayout}>
              {getFieldDecorator('serTypeId', {
                initialValue: formFieldsValue.serTypeId,
                rules: [{ required: false, message: '请选择服务类型' }],
              })(
                <HOCSelect
                  style={{ width: '100%' }}
                  placeholder="请选择服务类型"
                  allowClear
                  showSearch
                  optionFilterProp="children"
                >
                  {serviceDicList.map(item => (
                    <Option key={item.serTypeId}>{item.serTypeIdName}</Option>
                  ))}
                </HOCSelect>
              )}
            </FormItem>
          </Col>
        </Row>
        <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
          <Col md={8} sm={24}>
            <FormItem label="状态" {...this.tableSearchLayout}>
              {getFieldDecorator('state', {
                initialValue: formFieldsValue.state,
              })(
                <DictCode
                  dictType="SER_CLAIM_STATE"
                  allowClear
                  showSearch
                  optionFilterProp="children"
                />
              )}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <FormItem label="来源" {...this.tableSearchLayout}>
              {getFieldDecorator('source', {
                initialValue: formFieldsValue.source,
              })(
                <DictCode
                  dictType="REFUND_SOURCE"
                  allowClear
                  showSearch
                  optionFilterProp="children"
                />
              )}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <FormItem label="添加时间" {...this.tableSearchLayout}>
              {getFieldDecorator('creTime', {
                initialValue: formFieldsValue.creTime,
              })(<RangePicker style={{ width: '100%' }} />)}
            </FormItem>
          </Col>
        </Row>
        <Row gutter={{ md: 8, lg: 24, xl: 48 }} style={{ overflow: 'hidden' }}>
          <Col md={8} sm={24}>
            <FormItem {...this.tableSearchLayout} label="所属客服">
              {getFieldDecorator('blngCs', {
                rules: [{ required: false }],
                initialValue: formFieldsValue.blngCs,
              })(
                <SearchPersonEs
                  allowClear
                  showSearch
                  filterOption={(input, option) =>
                    option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                  }
                />
              )}
            </FormItem>
          </Col>
          <Col md={8} sm={24} />
          <Col md={8} sm={24}>
            <div style={{ overflow: 'hidden' }}>
              <span style={{ float: 'right', marginBottom: 24 }}>
                <Button type="primary" htmlType="submit" onClick={() => this.getList(activeKey)}>
                  查询
                </Button>
                <Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}>
                  重置
                </Button>
                <a style={{ marginLeft: 8 }} onClick={this.toggleForm}>
                  收起 <UpOutlined />
                </a>
              </span>
            </div>
          </Col>
        </Row>
      </Form>
    );
  }

  renderSimpleForm() {
    const { isCsweb } = this.state;
    const {
      form: { getFieldDecorator },
      activeKey,
      formFieldsValue,
    } = this.props;

    return (
      <Form onSubmit={this.handleSearch} layout="inline">
        <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
          <Col md={8} sm={24}>
            <FormItem label="姓名" {...this.tableSearchLayout}>
              {getFieldDecorator('empName', {
                initialValue: formFieldsValue.empName,
              })(<Input placeholder="请输入员工姓名" maxLength={15} />)}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <FormItem label="客户名称" {...this.tableSearchLayout}>
              {getFieldDecorator('custId', {
                initialValue: formFieldsValue.custId,
              })(isCsweb ? <Customer allowClear /> : <Customer attr allowClear />)}
            </FormItem>
          </Col>
          <Col md={8} sm={24}>
            <span className={styles.submitButtons}>
              <Button type="primary" htmlType="submit" onClick={() => this.getList(activeKey)}>
                查询
              </Button>
              <Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}>
                重置
              </Button>
              <a style={{ marginLeft: 8 }} onClick={this.toggleForm}>
                展开 <DownOutlined />
              </a>
            </span>
          </Col>
        </Row>
      </Form>
    );
  }

  render() {
    // const { rebate } = this.props;
    const {
      location,
      form: { getFieldDecorator },
      rebate: { paymentList },
    } = this.props;
    const authority = judegAuthority(location);
    const moreMenu = (
      <Menu>
        {checkPermissions([
          'business:insRefundInfo:execPayCompInsRefundInfo',
          'business:accuRefundInfo:execPayCompAccuRefundInfo',
        ]) &&
          authority !== 'socaccmanagesend' && (
            <Menu.Item onClick={this.markCharged}>标记已支付</Menu.Item>
          )}

        {checkPermissions([
          'business:insRefundInfo:execClaimInsRefundInfo',
          'business:accuRefundInfo:execClaimAccuRefundInfo',
        ]) &&
          (authority === 'socaccmanagesend' || authority === 'fmmanage') && (
            <Menu.Item onClick={this.alreadyPaid}>标记已到款</Menu.Item>
          )}
        <Menu.Item onClick={this.exportPage}>导出</Menu.Item>
      </Menu>
    );
    const { isSign, receivePaidFlag } = this.state;
    const { selectedRows } = this.props;
    return (
      <div>
        {/* <Card className={styles.searchCard}> */}
        {/* <Card style={{ marginTop: '16px', background: '#FAFAFA' }} title="" bordered={false}>
          <div className={styles.tableListForm}>{this.renderForm()}</div>
        </Card> */}
        <div
          className={styles.tableListForm}
          style={{
            margintop: 4,
            marginBottom: 16,
            paddingTop: 16,
            paddingRight: 16,
            backgroundColor: '#fafafa',
          }}
        >
          {this.renderForm()}
        </div>
        {/* <Card className={styles.tabCard}> */}
        <Row style={{ marginBottom: 16 }}>
          {/* <Card style={{ marginTop: '20px' }}> */}
          {authority === 'socaccmanagesend' ? null : (
            <Authorized authority="business:insRefundInfo:addInsRefundInfo" noMatch={null}>
              <Button type="primary" onClick={this.create} style={{ marginRight: 8 }}>
                <PlusOutlined />
                新增
              </Button>
            </Authorized>
          )}
          {authority === 'socaccmanagereceive' || authority === 'socaccmanagesend' ? null : (
            <Authorized
              authority={[
                'business:accuRefundInfo:uploadExcelAdd',
                'business:insRefundInfo:uploadExcelAdd',
              ]}
              noMatch={null}
            >
              <Button onClick={this.batchAdd} style={{ marginRight: 8 }}>
                批量新增
              </Button>
            </Authorized>
          )}
          {authority !== 'socaccmanagereceive' ? null : (
            <Authorized
              authority={[
                'business:accuRefundInfo:uploadExcelAdd',
                'business:insRefundInfo:uploadExcelAdd',
              ]}
              noMatch={null}
            >
              <Button type="primary" onClick={this.receivePaid} style={{ marginRight: 8 }}>
                标记已支付
              </Button>
            </Authorized>
          )}

          <Dropdown overlay={moreMenu}>
            <Button style={{ marginRight: 8 }}>
              更多 <DownOutlined />
            </Button>
          </Dropdown>
        </Row>
        <StandardTable {...this.props} />
        <Modal
          visible={isSign}
          onOk={this.submark}
          onCancel={this.closeUnmark}
          closable={false}
          destroyOnClose
          width="450px"
          footer={[
            <Button key="back" onClick={this.closeUnmark}>
              取消
            </Button>,
            <Button key="submit" type="primary" onClick={this.submark}>
              确认
            </Button>,
          ]}
        >
          <div style={{ margin: '15px 15px 0 15px' }}>
            <ExclamationCircleOutlined
              style={{ fontWeight: 800, color: '#EEC900', fontSize: '20px' }}
            />
            <span style={{ fontSize: '18px', fontWeight: 800, margin: '20px 0 0 10px' }}>
              已选择{selectedRows.length}条数据，是否确认全部标记已支付
            </span>
            <p style={{ color: '#A19095', margin: '10px 0 0 28px' }}>
              请线下和财务核实每笔款项已支付，标记后不可取消标记。
            </p>
          </div>
        </Modal>

        <Modal
          title="标记返款信息已支付"
          visible={receivePaidFlag}
          onOk={this.submitReceive}
          onCancel={this.closeReceive}
          closable={false}
          destroyOnClose
          width="450px"
          footer={[
            <Button key="back" onClick={this.closeReceive}>
              取消
            </Button>,
            <Button key="submit" type="primary" onClick={this.submitReceive}>
              确认
            </Button>,
          ]}
        >
          {/* <div style={{ margin: '15px 15px 0 15px' }}> */}
          {/* <Icon
              type="exclamation-circle"
              style={{ fontWeight: 800, color: '#EEC900', fontSize: '20px' }}
            /> */}
          <span>
            已选择{selectedRows.length}条数据，请线下和财务核实每笔款项已支付，标记后不可取消标记
          </span>
          <Form layout="inline" className={styles.productPrice}>
            <Form.Item label="支付对象">
              {getFieldDecorator('payObj', {
                rules: [
                  {
                    required: true,
                    message: '请选择',
                  },
                ],
              })(
                <Radio.Group>
                  {paymentList.map(item => (
                    <Radio key={item.itemCode} value={item.itemCode}>
                      {item.itemName}
                    </Radio>
                  ))}
                </Radio.Group>
              )}
            </Form.Item>
          </Form>
          {/* </div> */}
        </Modal>
      </div>
    );
  }
}

export default RebateTmp;
